.form > * {
  margin-bottom: $space-xs;
}

.input {
  label {
    @extend .label;
    position: relative;
    transform: translateY(6px);
    padding: 0 1px;
    margin-left: 5px;
    display: inline-block;
    font-weight: bold;
    transition: transform 200ms, background-color 200ms;
    font-size: $font-size-1;
    color: $gray-1;
    z-index: 1;

    &::before {
      content: " ";
      z-index: -1;
      background-color: white;
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 6px;
    }
  }

  input {
    border: 1px solid $white-4;
    width: 100%;
    padding: 0 6px;
    line-height: 2.33;
    font-size: $font-size-2;
    font-family: $body-font;
    border-radius: 3px;

    &.mono {
      font-family: $mono-font;
    }
  }

  &.focus {
    input {
      outline: none;
      border: 1px solid $gray-1;
      background: $white-2;
    }

    label {
      color: $gray-5;
      background: none;
      transform: translateY(0);

      &::before {
        display: none;
      }
    }
  }
}

.input-checkbox {
  padding-top: 8px;

  label {
    display: flex;
    @extend .label;
    font-weight: bold;
    align-items: center;
    font-size: $font-size-1;
    color: $gray-1;
  }

  input {
    margin: 0;
    margin-right: $space-s;
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border: 1px solid $white-4;
    position: relative;
    border-radius: 3px;

    &:after {
      content: "";
      position: absolute;
      top: 4px;
      left: 4px;
      right: 4px;
      bottom: 4px;
      background: linear-gradient($blue-light, $blue);
      box-shadow: 0px 0 3px 0 rgba(0, 0, 0, 0.25);
      border-radius: 8px;
      transform: scale(0);
      transition: transform 200ms;
    }

    &:checked:after {
      transform: scale(1);
    }
  }

  input:focus {
    outline: none;
    border: 1px solid $gray-1;
    background: $white-2;
  }
}

.input-submit {
  input {
    font-size: $font-size-1;
    text-transform: uppercase;
    color: $gray-4;
    font-weight: bold;
    background: linear-gradient($white-2, $white-3);
    border-radius: 5px;
    font-family: $body-font;
    height: 24px;
    min-width: 80px;

    &:hover {
      color: $gray-9;
    }

    &:focus {
      outline: none;
    }

    &:active {
      border: 1px solid $white-6;
      background: linear-gradient($white-3, $white-4);
      color: $gray-7;
      transform: translateY(1px);
    }
  }
}
